With development of communications technologies, direct communication such as Device to Device (D2D) communication or vehicle-to-vehicle (V2V) communication can be performed between devices.
In a device-to-device communications technology, a network-side device (for example, a base station) may perform a resource configuration, scheduling, coordination, and the like to assist terminals in performing device-to-device communication. Generally, the network-side device allocates a transmission resource pool to a device-to-device communications terminal, so that the terminal performs device-to-device communication data transmission. The resource pool may be understood as a time domain resource set, and includes a resource pool used for transmission and a resource pool used for reception. The network-side device configures different resource pools in a broadcast mode, for example, a scheduling assignment (SA) resource pool and a data resource pool, and each resource pool has a fixed period. The device-to-device communications terminal may use, in two modes, a time domain resource in a resource pool allocated by the network-side device. In one mode, the device-to-device communications terminal uses a time domain resource that is allocated and determined in the resource pool by the network-side device for every device-to-device communications terminal. In the other mode, the device-to-device communications terminal randomly selects a time domain resource from the resource pool autonomously. The device-to-device communications terminal selects a time domain resource from the resource pool in one of the two modes, and then performs device-to-device communication data transmission according to a fixed period of the resource pool.
When the device-to-device communications terminal performs device-to-device communication data transmission in the foregoing mode, randomness of a data packet generation time is relatively high. When a quantity of terminals is relatively large, the conventional resource pool allocation mode cannot adapt to service features properly, and a case of poor transmission performance occurs.